<?php
/**
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file license.txt or that can be found at 
 * http://code.google.com/p/billboardce/wiki/License.
 *
 * @package    Ot_Action_Helper_PageTitle
 * @category   Library
 * @license    http://code.google.com/p/billboardce/wiki/License New BSD License
 * @version    SVN: $Id: $
 */

/**
 * Adds additional features to a title of a page
 *
 * @package    Ot_Action_Helper_PageTitle
 * @category   Library
 */
class Ot_Action_Helper_PageTitle extends Zend_Controller_Action_Helper_Abstract
{
    public function pageTitle($title, $options = array())
    {
        $view = Zend_Layout::getMvcInstance()->getView();
        $view->title = $view->translate($title, $options);
        
    }
    
    /**
     * Perform helper when called as $this->_helper->pageTitle() from an action controller
     *
     * @param  string $title
     * @param  array $options
     * @return string
     */
    public function direct($title, $options = array())
    {
        return $this->pageTitle($title, $options);
    }
}